package com.med.controller;

import com.med.entity.MedicineDO;
import com.med.service.ConcernService;
import com.med.vo.CollectionVO;
import com.med.vo.ConcernVO;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/concern")
public class ConcernController extends BaseController {
    @Autowired
    private ConcernService concernService;
//    查询关注
@RequestMapping("/query")
public TableDataInfo queryConcern(ConcernVO concernVO) {
    return getDataTable(concernService.queryConcern(concernVO));
}
//关注软删除
    @RequestMapping("/delete")
    public AjaxResult updateConcern(ConcernVO concernVO) {
        System.out.println(concernVO);
        return toAjax(concernService.updateConcern(concernVO));
    }
//    查询商品收藏
@RequestMapping("/queryCollection")
public TableDataInfo queryCollection(CollectionVO collectionVO) {

    return getDataTable(concernService.queryCollection(collectionVO));
}
//取消商品收藏
@RequestMapping("/deleteCollection")
public AjaxResult updateCollection(CollectionVO collectionVO) {
    System.out.println(collectionVO);
    return toAjax(concernService.updateCollection(collectionVO));
}


}
